<template>
	<!-- 设置 -->
	<view class="bigbox pb40">
		<!-- 设置每一项 -->
		<view class="setupbox h120 flex col-center row-between pl36 pr38 mt34"
			@tap="$jump('/pages/my/setup/Edit-data/Edit-data')">
			<text>修改个人信息</text>
			<u-icon name="arrow-right" size="22" color="#B9C4D6"></u-icon>
		</view>

		<view class="setupbox h120 flex col-center row-between pl36 pr38 mt34"
			@tap="$jump('/pages/my/setup/mobileAdmin/mobileAdmin')">
			<text>手机号管理</text>
			<u-icon name="arrow-right" size="22" color="#B9C4D6"></u-icon>
		</view>

		<view class="setupbox h120 flex col-center row-between pl36 pr38 mt34"
			@tap="$jump('/pages/my/setup/editLoginPasswd/editLoginPasswd')">
			<text>修改登录密码</text>
			<u-icon name="arrow-right" size="22" color="#B9C4D6"></u-icon>
		</view>

		<view class="setupbox h120 flex col-center row-between pl36 pr38 mt34"
			@tap="$jump('/pages/my/setup/paySetting/paySetting')">
			<text>支付设置</text>
			<u-icon name="arrow-right" size="22" color="#B9C4D6"></u-icon>
		</view>
		<view class="setupbox h120 flex col-center row-between pl36 pr38 mt34"
			@tap="$jump('/pages/my/wxalipay/wxalipay?type=1')">
			<text>完善微信信息</text>
			<u-icon name="arrow-right" size="22" color="#B9C4D6"></u-icon>
		</view>
		<view class="setupbox h120 flex col-center row-between pl36 pr38 mt34"
			@tap="$jump('/pages/my/wxalipay/wxalipay?type=2')">
			<text>完善支付宝信息</text>
			<u-icon name="arrow-right" size="22" color="#B9C4D6"></u-icon>
		</view>
		<view class="setupbox h120 flex col-center row-between pl36 pr38 mt34"
			@tap="$jump('/pages/my/feedBack/feedBack')">
			<text>意见反馈</text>
			<u-icon name="arrow-right" size="22" color="#B9C4D6"></u-icon>
		</view>
		<view class="setupbox h120 flex col-center row-between pl36 pr38 mt34"
			@tap="cancellation">
			<text>注销账户</text>
			<u-icon name="arrow-right" size="22" color="#B9C4D6"></u-icon>
		</view>
		<view class="setupbox h120 flex col-center row-between pl36 pr38 mt34"
			@tap="$jump('/pages/register/zhucexieyi?from=1')">
			<text>注册协议</text>
			<u-icon name="arrow-right" size="22" color="#B9C4D6"></u-icon>
		</view>
		<view class="setupbox h120 flex col-center row-between pl36 pr38 mt34"
			@tap="$jump('/pages/register/zhucexieyi?from=2')">
			<text>隐私协议</text>
			<u-icon name="arrow-right" size="22" color="#B9C4D6"></u-icon>
		</view>
		<view class="flex row-center">
			<view class=" h86 paybtn" @tap="logout()">
				退出登录
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			};
		},
		methods: {
			logout() {
				this.$api.logout().then(res => {
					this.$msg(res.msg)
					setTimeout(()=>{
						this.$jump('/pages/login/login')
					},800)
				})
			},
			//注销
			cancellation() {
				let that=this
				uni.showModal({
				    title: '提示',
				    content: '注销将清空您的所以数据,是否确认注销?',
				    success: function (res) {
				        if (res.confirm) {
				            console.log('用户点击确定');
							that.$api.cancellation().then(res=>{
								that.$msg(res.msg)
								uni.removeStorage('token')
								setTimeout(()=>{
									that.$jump('/pages/login/login')
								},500)
							})
							
				        } else if (res.cancel) {
				            console.log('用户点击取消');
				        }
				    }
				});
			}
		}
	}
</script>

<style lang="scss">
	.setupbox {
		background: #FFFFFF;
		box-shadow: 0px 6rpx 20rpx 0px #E8EAEF;
		border-radius: 8rpx;

		text {
			font-size: 28rpx;
			font-weight: 500;
			color: #1D2538;
		}
	}

	.paybtn {
		width: 80%;
		margin-top: 40rpx;
		text-align: center;
		line-height: 86rpx;
		background: #fff;
		border-radius: 10rpx;
		color: #1385FF;
		z-index: 99;
		border: 2rpx solid #1385FF;
	}
</style>
